using System;
using System.Collections;
using Rdl;

namespace GTame.ReportParser
{

    public class ImageType
    {

        private GTame.ReportParser.ActionType _Action;
        private string _Bookmark;
        private GTame.ReportParser.CustomPropertiesType _CustomProperties;
        private string _DataElementName;
        private Rdl.ImageTypeDataElementOutput _DataElementOutput;
        private string _Height;
        private string _Label;
        private string _Left;
        private string _LinkToChild;
        private string _MIMEType;
        private string _RepeatWith;
        private Rdl.ImageTypeSizing _Sizing;
        private Rdl.ImageTypeSource _Source;
        private GTame.ReportParser.StyleType _Style;
        private string _ToolTip;
        private string _Top;
        private string _Value;
        private GTame.ReportParser.VisibilityType _Visibility;
        private string _Width;
        private System.Nullable<uint> _ZIndex;
        private string nameField;

        public GTame.ReportParser.ActionType Action
        {
            get
            {
                if (_Action == null)
                    _Action = new GTame.ReportParser.ActionType();
                return _Action;
            }
            set
            {
                _Action = value;
            }
        }

        public string Bookmark
        {
            get
            {
                return _Bookmark;
            }
            set
            {
                _Bookmark = value;
            }
        }

        public GTame.ReportParser.CustomPropertiesType CustomProperties
        {
            get
            {
                if (_CustomProperties == null)
                    _CustomProperties = new GTame.ReportParser.CustomPropertiesType();
                return _CustomProperties;
            }
            set
            {
                _CustomProperties = value;
            }
        }

        public string DataElementName
        {
            get
            {
                return _DataElementName;
            }
            set
            {
                _DataElementName = value;
            }
        }

        public Rdl.ImageTypeDataElementOutput DataElementOutput
        {
            get
            {
                return _DataElementOutput;
            }
            set
            {
                _DataElementOutput = value;
            }
        }

        public string Height
        {
            get
            {
                return _Height;
            }
            set
            {
                _Height = value;
            }
        }

        public string Label
        {
            get
            {
                return _Label;
            }
            set
            {
                _Label = value;
            }
        }

        public string Left
        {
            get
            {
                return _Left;
            }
            set
            {
                _Left = value;
            }
        }

        public string LinkToChild
        {
            get
            {
                return _LinkToChild;
            }
            set
            {
                _LinkToChild = value;
            }
        }

        public string MIMEType
        {
            get
            {
                return _MIMEType;
            }
            set
            {
                _MIMEType = value;
            }
        }

        public string Name
        {
            get
            {
                return nameField;
            }
            set
            {
                nameField = value;
            }
        }

        public string RepeatWith
        {
            get
            {
                return _RepeatWith;
            }
            set
            {
                _RepeatWith = value;
            }
        }

        public Rdl.ImageTypeSizing Sizing
        {
            get
            {
                return _Sizing;
            }
            set
            {
                _Sizing = value;
            }
        }

        public Rdl.ImageTypeSource Source
        {
            get
            {
                return _Source;
            }
            set
            {
                _Source = value;
            }
        }

        public GTame.ReportParser.StyleType Style
        {
            get
            {
                if (_Style == null)
                    _Style = new GTame.ReportParser.StyleType();
                return _Style;
            }
            set
            {
                _Style = value;
            }
        }

        public string ToolTip
        {
            get
            {
                return _ToolTip;
            }
            set
            {
                _ToolTip = value;
            }
        }

        public string Top
        {
            get
            {
                return _Top;
            }
            set
            {
                _Top = value;
            }
        }

        public string Value
        {
            get
            {
                return _Value;
            }
            set
            {
                _Value = value;
            }
        }

        public GTame.ReportParser.VisibilityType Visibility
        {
            get
            {
                if (_Visibility == null)
                    _Visibility = new GTame.ReportParser.VisibilityType();
                return _Visibility;
            }
            set
            {
                _Visibility = value;
            }
        }

        public string Width
        {
            get
            {
                return _Width;
            }
            set
            {
                _Width = value;
            }
        }

        public System.Nullable<uint> ZIndex
        {
            get
            {
                return _ZIndex;
            }
            set
            {
                _ZIndex = value;
            }
        }

        public ImageType()
        {
            _ZIndex = new System.Nullable<uint>[]();
        }

        public Rdl.ImageType Write()
        {
            Rdl.ImageType imageType = new Rdl.ImageType();
            System.Collections.ArrayList arrayList1 = new System.Collections.ArrayList();
            System.Collections.ArrayList arrayList2 = new System.Collections.ArrayList();
            imageType.Name = nameField;
            if (_Action != null)
            {
                arrayList1.Add(_Action.Write());
                arrayList2.Add(1);
            }
            if (_Bookmark != null)
            {
                arrayList1.Add(_Bookmark);
                arrayList2.Add(2);
            }
            if (_CustomProperties != null)
            {
                arrayList1.Add(_CustomProperties.Write());
                arrayList2.Add(3);
            }
            if (_DataElementName != null)
            {
                arrayList1.Add(_DataElementName);
                arrayList2.Add(4);
            }
            arrayList1.Add(_DataElementOutput);
            arrayList2.Add(5);
            if (_Height != null)
            {
                arrayList1.Add(_Height);
                arrayList2.Add(6);
            }
            if (_Label != null)
            {
                arrayList1.Add(_Label);
                arrayList2.Add(7);
            }
            if (_Left != null)
            {
                arrayList1.Add(_Left);
                arrayList2.Add(8);
            }
            if (_LinkToChild != null)
            {
                arrayList1.Add(_LinkToChild);
                arrayList2.Add(9);
            }
            if (_MIMEType != null)
            {
                arrayList1.Add(_MIMEType);
                arrayList2.Add(10);
            }
            if (_RepeatWith != null)
            {
                arrayList1.Add(_RepeatWith);
                arrayList2.Add(11);
            }
            arrayList1.Add(_Sizing);
            arrayList2.Add(12);
            arrayList1.Add(_Source);
            arrayList2.Add(13);
            if (_Style != null)
            {
                arrayList1.Add(_Style.Write());
                arrayList2.Add(14);
            }
            if (_ToolTip != null)
            {
                arrayList1.Add(_ToolTip);
                arrayList2.Add(15);
            }
            if (_Top != null)
            {
                arrayList1.Add(_Top);
                arrayList2.Add(16);
            }
            if (_Value != null)
            {
                arrayList1.Add(_Value);
                arrayList2.Add(17);
            }
            if (_Visibility != null)
            {
                arrayList1.Add(_Visibility.Write());
                arrayList2.Add(18);
            }
            if (_Width != null)
            {
                arrayList1.Add(_Width);
                arrayList2.Add(19);
            }
            if (_ZIndex.get_HasValue())
            {
                arrayList1.Add(_ZIndex);
                arrayList2.Add(20);
            }
            imageType.Items = arrayList1.ToArray();
            imageType.ItemsElementName = (Rdl.ItemsChoiceType15[])arrayList2.ToArray(typeof(Rdl.ItemsChoiceType15));
            arrayList2 = arrayList1 = null;
            return imageType;
        }

    } // class ImageType

}

